﻿@using TjZheng.Domain.DataEntity;
@{
    ViewBag.Title = "评论排行";
    Layout = "~/Views/Shared/_ListLayout.cshtml";
    if (TransferThreeID.IsNoNull())
    {
        CurrentButtonTool.AddItem(new ButtonItem { ButtonIcon = "icon-back", ButtonName = "返回", Execution = "Back()", Position = ButtonPosition.Top });
    }
    DbSetInfo objDbSetInfo = ViewBag.DbSetInfo as DbSetInfo;
}
@inherits CMSWebViewPage<object>
@section Head{

}
<div id="toolbar_commentrank" class="datagrid-toolbar">
    @CurrentButtonTool.Create()
    <div>
        <form id="fr_search_commentrank" method="post">
            @Html.QueryDateTimeBox("创建时间", "CreateDate")-@Html.QueryDateTimeBox("", "CreateDate", QueryMethod.LessEqual, QueryDataType.DateTime)
            <a onclick="Search();" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true"></a>
        </form>
    </div>
</div>
<table id="dg_commentrank" data-options="url:'/bbs/commentinfo/rankjson?SetId=@objDbSetInfo.SetId@(TransferThreeID.IsNoNull() ? "&ObjectId=" + TransferThreeID : "")',border:false,fit:true,fitColumns:true,toolbar:'#toolbar_commentrank',singleSelect:true,pagination:true,pageSize:20">
    <thead>
        <tr>
            <th data-options="field:'ck',checkbox:true"></th>
            <th data-options="field:'UserId',width:50,align:'center'">用户编码</th>
            <th data-options="field:'Name',width:50,align:'center'">用户名称</th>
            <th data-options="field:'CardNo',width:50,align:'center'">身份证号</th>
            <th data-options="field:'DiggCount',width:20,align:'center'">顶数</th>
            <th data-options="field:'Content',width:120,align:'center'">评论内容</th>
            <th data-options="field:'CreateDate',width:50,align:'center',formatter:JsonToDate">评论时间</th>
        </tr>
    </thead>
</table>
@section Bottom{
    <script type="text/javascript">
    var objBizDatagrid = new BizDatagrid('#dg_commentrank');
    function Search() {
        objBizDatagrid.search('#fr_search_commentrank', '/bbs/commentinfo/rankjson?SetId=@objDbSetInfo.SetId@(TransferThreeID.IsNoNull() ? "&ObjectId=" + TransferThreeID : "")');
    }
    function Export() {
        objBizDatagrid.export('#fr_search_commentrank', '/bbs/commentinfo/export?SetId=@objDbSetInfo.SetId@(TransferThreeID.IsNoNull() ? "&ObjectId=" + TransferThreeID : "")');
    }
    function Back() {
        window.location.href = "/bbs/articleinfo?TransferID=@(TransferID)&TransferTwoID=@(TransferTwoID)&SetId=@objDbSetInfo.SetId";
    }
</script>
}
